package org.dromara.business.domain.bo;

import org.dromara.business.domain.UserStaking;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 用户质押记录业务对象 app_user_stakings
 *
 * @author Eric
 * @date 2025-09-05
 */
@Data
@AutoMapper(target = UserStaking.class, reverseConvertGenerate = false)
public class UserStakingBo {

    /**
     * 质押ID
     */
    private Long id;

    /**
     * 用户ID
     */
    private Long userId;
    private String walletAddress;

    /**
     * 产品ID
     */
    private Long productId;
    private String productName;

    /**
     * 订单号
     */
    private String orderNo;

    /**
     * 质押金额
     */
    private BigDecimal stakingAmount;

    /**
     * 日收益率（%）
     */
    private BigDecimal dailyRate;

    /**
     * 质押周期（天）
     */
    private Integer periodDays;

    /**
     * 预计总收益
     */
    private BigDecimal totalEarnings;

    /**
     * 已支付收益
     */
    @NotNull(message = "已支付收益不能为空", groups = { AddGroup.class, EditGroup.class })
    private BigDecimal paidEarnings;

    /**
     * 剩余天数
     */
    private Integer remainingDays;

    /**
     * 开始日期
     */
    private LocalDateTime startDate;

    /**
     * 结束日期
     */
    private LocalDateTime endDate;

    /**
     * 最后返利日期
     */
    @NotNull(message = "最后返利日期不能为空", groups = { AddGroup.class, EditGroup.class })
    private LocalDateTime lastRebateDate;

    /**
     * 状态
     */
    @NotNull(message = "状态不能为空", groups = { AddGroup.class, EditGroup.class })
    private Integer status;

    private String[] dateRange;
    private String[] lastRebateDateRange;
}
